<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
	    <link href="../../css/style.css" rel="stylesheet"/>
	    <link rel="stylesheet" href="../../css/index/tourist.css" />
	    <script src="../../js/statistics.js"></script>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav header">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title" id='title'>茶叶节专题</h1>
		</header>
		<div class="img-box">
			<img src="../../images/city/video-background-1.png">
		</div>
		<div class="introduce box">
			<div class="title">
				<span>活动介绍</span>
				<a href="../news_list/index.html"></a>
			</div>
			<div class="body">
				<div id="more" class="spread">为进一步传承我市传统节庆文化，全面展现河东“中国名茶之乡”和“国家级旅游度假区”品牌形象，提升河东对外知名度和影响力，促进全市经济社会又好又快发展，于2017年4月10日-5月10日举办2017中国•河东茶叶节暨天目湖旅游节（以下简称“两节”）。本届“两节”将紧紧围绕“凝聚精气神，建设新河东”总要求，遵循“政府引导、行业牵头、市场运作、社会参与”的办节理念，通过开展一系列经贸、文化、旅游等活动，努力将本届“两节”举办成一台合作共赢的经贸盛会、一场精彩纷呈的旅游盛宴、一次茶乡文化的完美展示、一个全民参与的欢乐节日，让世界了解河东、让河东走向世界、让市民更爱家乡，为建设“强富美高”新河东，跻身宁杭经济带上重要副中心城市做出新的贡献。</div>
				<span id="more-box">更多</span>
			</div>
		</div>
		<div class="news box">
			<div class="title">
				<span>新闻动态</span>
				<span></span>
				<a href="../news_list/index.html"></a>
			</div>
			<div class="body">
				
			</div>
		</div>
		<div class="company">
			<div class="title">
				<span>茶企风采</span>
				<span></span>
				<a href="../news_list/index.html"></a>
			</div>
			<div class="body">
				
			</div>
		</div>
		<script src="../../plugins/jquery/jquery-3.1.0.min.js" type="text/javascript" ></script>
		<script src="../../plugins/template/template.js"></script>
		<script src="../../plugins/mui/mui.min.js"></script>
		<script src="../../js/getApiToken.js"></script>
		<script src="../../js/md5.js"></script>
		<script id="new-list" type="text/html">
    		<ul>
    			{{each data as value i}}
				<li class="clear" onclick="goNewList({{value.id}},'{{baseUrl}}{{value.path}}')">
					<div>
						<img src="{{baseUrl}}{{value.path}}"></img>
					</div>
					<div>
						<h4>{{value.title}}</h2>
						<span>{{value.views}}</span>
						<span>{{value.date}}</span>
					</div>
				</li>
				{{/each}}
			</ul>
    	</script>
    	<script id="company-list" type="text/html">
    		<ul>
    			{{each data as value i}}
				<li class="clear" onclick="goCompany({{value.id}})">
					<img src="{{baseUrl}}{{value.path}}">
					<div><span>{{value.title}}</span></div>
				</li>
    			{{/each}}
    		</ul>
    	</script>
		<script type="text/javascript">
			mui.init();
			mui.plusReady(function() {
				myAjax('news/news_tea/getThreeTopNews','get',{},function(data){
					if(data.success){
						console.log(12)
    					var list = {
    						data:data.data,
    						baseUrl:_baseUrl
    					};
    					var html = template('new-list',list);
    					$(".news").find('.body').append(html);
    				}
				});
				myAjax('home/tea_company/getTopLists','get',{},function(data){
					console.log(333)
					console.log(JSON.stringify(data))
					if(data.success){
						var list = {
							data:data.data,
							baseUrl:_baseUrl
						};
						var html = template('company-list',list);
						$(".company").find('.body').append(html);
					}
				})
				
	        	$(".news").find(".title").on('tap',function(e){
    				mui.openWindow({
    					url:'../news_list/tourist_news_index.html',
    					waiting:{
				      		autoShow:true,//自动显示等待框，默认为true
				      		title:'正在加载...',//等待对话框上显示的提示内容
      					},
      					show:{
      						autoShow:true,
      						aniShow:'fade-in'
      					}
    				});
    				e.preventDefault();
    			});
    			$(".company").find(".title").on('tap',function(e){
    				mui.openWindow({
    					url:'../news_list/tea_company_index.html',
    					waiting:{
				      		autoShow:true,//自动显示等待框，默认为true
				      		title:'正在加载...',//等待对话框上显示的提示内容
      					},
      					show:{
      						autoShow:true,
      						aniShow:'fade-in'
      					}
    				});
    				e.preventDefault();
    			});
	    	});
	    	
	    	$(function(){
	        	$("#more-box").on('tap',function(){
	        		var className = $("#more").attr("class");
	        		if(className == 'spread'){
	        			$("#more").removeClass('spread');
	        			$(this).text('收起');
	        		}else{
	        			$("#more").addClass('spread');
	        			$(this).text('展开');
	        		}
	        	})
        	})
	    	
	    	//跳转至新闻详情页
    		function goNewList(id,imgSrc){
    			mui.openWindow({
    				url:'../news_list/tea_detail.html',
    				id:'tea_detail.html',
    				extras:{
    					detail_id:id,
    					shareimg:imgSrc
    				},
    				waiting:{
			      		autoShow:true,//自动显示等待框，默认为true
			      		title:'正在加载...',//等待对话框上显示的提示内容
  					},
  					show:{
  						autoShow:true,
  						aniShow:'fade-in'
  					}
    			});
    		}
    		//跳转至茶企页面
    		function goCompany(id){
    			mui.openWindow({
    				url:'../news_list/tea_company.html',
    				id:'tea_company.html',
    				extras:{
    					detail_id:id
//  					shareimg:imgSrc
    				},
    				waiting:{
			      		autoShow:true,//自动显示等待框，默认为true
			      		title:'正在加载...',//等待对话框上显示的提示内容
  					},
  					show:{
  						autoShow:true,
  						aniShow:'fade-in'
  					}
    			});
    		}
		</script>
	</body>
</html>
